import request from '@/utils/axios'
import assist from '@/utils/commonality'

/**
 * 
 * @param { 路径 } path 
 * @param { get还是post } method 
 * @param { 接口id } business_id 
 * @param { 请求参数 } params 
 * @returns 
 */
 export function getspQuest(path,method,business_id,params) { 
  return request({
    url: 'https://bucenter.proxy.sanwubeixin.cn/what',
    method: 'post',
    headers: {
      'Content-Type': 'application/json' // 根据需要设置请求头

    },
    data:JSON.stringify({
      encode:assist.encrypt({
        path: path,
        method: method,
        business_id: business_id,
        params: params,
      })
    }),
    
  })
 }

 export function getspQuest1(path,method,business_id,params) { 
  console.log(123321);
  console.log({
    'Content-Type': 'application/json', // 根据需要设置请求头
    "type": 0, 
    "is_trial": 0
  });
  
  
  
  return request({
    url: 'https://bucenter.proxy.sanwubeixin.cn/what',
    method: 'post',
    headers: {
      'Content-Type': 'application/json', // 根据需要设置请求头
      "type": 0, 
      "is_trial": 0
    },
    data:JSON.stringify({
      encode:assist.encrypt({
        path: path,
        method: method,
        business_id: business_id,
        params: params,
      })
    }),
    
  })
 }